<template>
    <!--
        _id :声明地址参数，参数名（id）
     -->
<div class="wrapper activities"> 
   <h1>{{item.name}}</h1> 
   <div class="img-text"> 
    <div class="left-img"> 
     <img src="~/assets/img/widget-acti.png" alt="" /> 
    </div> 
    <div class="right-txt"> 
     <p>开始时间： {{item.starttime}}</p> 
     <p>结束时间： {{item.endtime}}</p> 
     <p>举办地点： 深圳市华侨城洲际酒店</p> 
     <p>主办方：infoQ</p> 
     <p>报名截止： <span class="big">85</span>天 <span class="big">15</span>时 <span class="big">16</span>分 <span class="big">10</span>秒</p> 
     <div class="join"> 
      <button class="sui-btn btn-danger">立即报名</button> 
      <span class="will">报名即将开始</span> 
     </div> 
    </div> 
   </div> 
   <div class="simple-text"> 
    <div class="left-content"> 
     <div class="content-item"> 
      <div class="tit">
       <span>大会介绍</span>
      </div> 
      <div class="text"> 
        {{item.summary}}
      </div> 
     </div> 
     <div class="content-item"> 
      <div class="tit">
       <span>议题简介</span>
      </div> 
      <div class="text"> 
        </div> 
      <div class="text"> 
            {{item.detail}}
          </div> 

     </div> 
    </div> 
    <div class="right-intro"> 
     <div class="content-item"> 
      <div class="tit">
       <span>活动组织者</span>
      </div> 
      <div class="text"> 
       <p>主办方： infoQ</p> 
      </div> 
     </div> 
     <div class="content-item"> 
      <div class="tit">
       <span>相关链接</span>
      </div> 
      <div class="text"> 
       <p>活动官网： infoQ.com</p> 
      </div> 
     </div> 
     <div class="content-item"> 
      <div class="tit">
       <span>分享扩散</span>
      </div> 
        <div class="social-share" data-sites="qq,weibo,wechat" data-url="http://www.itheima.com"></div>
     </div> 
    </div> 
   </div> 
  </div> 
</template>

<script>
import gatheringApi from "~/api/gathering"
import "~/assets/css/page-sj-activity-detail.css"
export default {
    //获取地址参数
    //context ： 上下文对象     context.params ： 全部的地址参数列表
    //活动id = context.params.id
    asyncData(context) {
        let id = context.params.id;
        return gatheringApi.findById(id).then(res => {
            //console.log(res.data)
            let pojo = res.data.data
            return {
                item:pojo
            }
        })
    },
    head: {
        script: [
            { src: 'https://cdn.bootcss.com/social-share.js/1.0.16/js/social-share.min.js' }
        ],
        link: [
            { rel: 'stylesheet', href: 'https://cdn.bootcss.com/social-share.js/1.0.16/css/share.min.css' }
        ]
    }

}
</script>

<style>

</style>
